package mlz.b_thread;

/*
    线程类
 */
public class DrawThread extends Thread{
    private Account acc;


    //构造方法
    public DrawThread(Account acc) {
        this.acc = acc;
    }

    public DrawThread(String name, Account acc) {
        super(name);
        this.acc = acc;
    }


    //执行任务的方法 重写run
    @Override
    public void run() {
        //做取钱操作
        acc.drawMoney(100000);
    }
}
